/**
 * 营销相关api
 */
import {
	http
} from '@/api/config.js'

/**
 * 查询营销活动信息
 * @param {Object} params - 营销id
 */
export const getMarketingInfo = (id) => {
	return http.get('/marketing/get/' + id)
}

/**
 * 查询首页轮播列表
 * @param {Object} params - 查询参数
 */
export const getCarouselProductList = (type) => {
	return http.get('/marketing/carousel/' + type)
}

/**
 * 查询营销列表
 * @param {Object} params - 查询参数
 */
export const getMarketingList = (type) => {
	return http.get('/marketing/list/' + type)
}

/**
 * 根据营销ID分页查询商品
 * @param {Object} params - 营销ID
 */
export const getMarketingProductPage = (param) => {
	return http.post('/marketing/pageById', {
		...param
	})
}